<?php

require "vendor/autoload.php";

function micro_time()
{
   list($usec, $sec) = explode(" ", microtime());
   return ($usec * 1000000 + $sec * 1000000);
}

$client = new \Predis\Client([
   'scheme' => 'tcp',
   'host'   => '127.0.0.1',
   'port'   => 6379,
]);
$starttime = micro_time();
$client->set('a', 'b');
$endtime = micro_time();
var_dump("时间差:" . ($endtime - $starttime));
$res = $client->get('a');
var_dump($res);
